package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.service.IStrategyCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/strategyComments")
public class StrategyCommentController {
    @Autowired
    private IStrategyCommentService strategyCommentService;
    @GetMapping
    public Object getUsers(Integer state){
        List usersAndStrategies = strategyCommentService.getUsers(state);
        return usersAndStrategies;
    }

    //根据评论id查询评论
    @GetMapping("{id}")
    public Object getStrategyComment(@PathVariable("id") Long strategyCommentId){
        return  strategyCommentService.getStrategyComment(strategyCommentId);

    }




}
